#!/bin/sh

# 复制项目的文件到对应docker路径，便于一键生成镜像。
usage() {
	echo "Usage: sh copy.sh"
	exit 1
}


# copy sql
echo "begin copy sql "
cp ../sql/ry_20240629.sql ./mysql/db
cp ../sql/ry_config_20240902.sql ./mysql/db

# copy html
echo "begin copy html "
cp -r ../datahub-ui/dist/** ./nginx/html/dist


# copy jar
echo "begin copy datahub-gateway "
cp ../datahub-gateway/target/datahub-gateway.jar ./datahub/gateway/jar

echo "begin copy datahub-auth "
cp ../datahub-auth/target/datahub-auth.jar ./datahub/auth/jar

echo "begin copy datahub-visual "
cp ../datahub-visual/datahub-monitor/target/datahub-visual-monitor.jar  ./datahub/visual/monitor/jar

echo "begin copy datahub-modules-system "
cp ../datahub-modules/datahub-system/target/datahub-modules-system.jar ./datahub/modules/system/jar

echo "begin copy datahub-modules-file "
cp ../datahub-modules/datahub-file/target/datahub-modules-file.jar ./datahub/modules/file/jar

echo "begin copy datahub-modules-job "
cp ../datahub-modules/datahub-job/target/datahub-modules-job.jar ./datahub/modules/job/jar

echo "begin copy datahub-modules-gen "
cp ../datahub-modules/datahub-gen/target/datahub-modules-gen.jar ./datahub/modules/gen/jar

